package io;
import java.util.regex.*;
import java.io.*;
import java.util.*;
import net.mindview.util.*;
public class DirList1b {
    public static void main(String[] args) {
        File path=new File(".");
        final String[] list;
        if(args.length==0){
            list=path.list();
            System.out.println("Usage: enter words,one or more of which each file must contain");
        }else{
            list=path.list(new FilenameFilter() {
                @Override
                public boolean accept(File dir, String name) {
                    return !(Collections.disjoint(Arrays.asList(args),(Collection<?>) new TextFile(name,"\\W")));
                }
            });
        }

    }
}
